<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="order/include :: header"></head>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="form-horizontal m-t" id="signupForm">

                        <input type="hidden" th:value="${brandVo.id}" id="id" name="id">
                        <table class="table table-bordered table-condensed">
                            <tbody>

                            <!--                                <th class="required" >需要支付:</th>-->
                            <!--                                <td th:text="${brandVo.payprice}"></td>-->

                            <!--                                <th class="required" >下单时间:</th>-->
                            <!--                                <td th:text="${brandVo.createTime} == null?null:${#dates.format(brandVo.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>-->
                            <!--                            </tr>-->
                            <!--                            <tr>-->
                            <!--                                <th class="required" >品牌状态:</th>-->
                            <!--                                <td th:text="${brandVo.status}"></td>-->

                            <!--                                <th class="required" >品牌显示:</th>-->
                            <!--                                <td th:text="${brandVo.enabled} == null?null:${#dates.format(brandVo.payTime,'yyyy-MM-dd HH:mm:ss')}"></td>-->
                            <!--                            </tr>-->
                            <!--                            <tr>-->
                            <!--                                <th >备注:</th>-->
                            <!--                                <td colspan="3">-->
                            <!--                                    <textarea th:text="${brandVo.remark}" class="form-control" onblur="saveRemark()" id="remark"></textarea>-->
                            <!--                                </td>-->
                            <!--                            </tr>-->

                            <tr>
                                <th class="required" >品牌名:</th>
                                <td th:text="${brandVo.name}"></td>

                                <th class="required" >商户名:</th>
                                <td th:text="${brandVo.centreName}"></td>
                            </tr>

                            <tr>
                                <th class="required" >状态:</th>
                                <td th:text="${brandVo.status} == '1'? '正在启用':'已禁用'"></td>

                                <th class="required" >是否隐藏:</th>
                                <td th:text="${brandVo.enabled} == '1'? '公开可见':'已隐藏'"></td>
                            </tr>

                            </tbody>
                        </table>
                    </div>



                    <div class="ibox-title">
                        <h5>绑定分类与商品</h5>
                    </div>
                    <div class="form-horizontal m-t">
                        <table class="table table-bordered table-condensed">
                            <thead>
                            <tr>
                                <th>分类id</th>
                                <th>分类名称</th>
                                <!--										<th>单品佣金*份数</th>-->
                                <!--										<th>佣金</th>-->
                                <!--										<th>清单状态</th>-->
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="item:${brandVo.brandCategoryList}">
                                <td th:text="${item.id}"></td>
                                <td th:text="${item.name}"></td>
                                <!--									<td th:text="${item.headcommission}+'*'+${item.total}+'份'"></td>-->
                                <!--									<td th:text="${item.commision1}"></td>-->
                                <!--									<td th:text="${item.iscreate} == '1'?'已生成':'未生成'"></td>-->
                            </tr>
                            </tbody>
                        </table>

                        <table class="table table-bordered table-condensed">
                            <thead>
                            <tr>
                                <th>商品id</th>
                                <th>商品名</th>
                                <th>归属分类</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="item:${brandVo.brandProductCentreList}">
                                <td th:text="${item.id}"></td>
                                <td th:text="${item.title}"></td>
                                <td th:text="${item.ccateName}"></td>
                            </tr>
                            </tbody>
                        </table>

                        <div class="form-group text-center">
                            <div class="col-sm-8 col-sm-offset-2">
                                <div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
<div th:include="order/include::footer"></div>
<script type="text/javascript">
    function closeDow() {
        var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
        parent.layer.close(index);
    }

    // function saveRemark() {
    //     $.ajax({
    //         url: "/brandVo/manage" + "/update",
    //         type: "POST",
    //         data: {
    //             id: $('#id').val(),
    //             remark:$('#remark').val()
    //         },
    //         success: function (r) {
    //             parent.layer.msg(r.msg);
    //         }
    //     });
    // }
</script>
</body>
</html>
